﻿using System.Collections.Generic;
using System.ServiceModel;
using Jarvis.WCF.DataContracts;

namespace Jarvis.WCF.ServiceContracts
{
    [ServiceKnownType(typeof(List<Location>))]
    [ServiceContract()]
    public interface ILocatorService
    {
        [OperationContract]
        IList<DataContracts.Location> GetKnownLocations();
        
        /// <summary>
        /// Current user agent location as reported by the Server
        /// </summary>
        /// <returns> Current user agent location</returns>
        [OperationContract]
        Location GetCurrentLocation();


        /// <summary>
        /// Stores the current user agent position in the known location database
        /// </summary>
        /// <param name="location">Location to store</param>
        [OperationContract]
        void StoreLocation(Location location);


        /// <summary>
        /// Updates the location in the database
        /// </summary>
        /// <param name="location">Location to update</param>
        [OperationContract]
        void Update(Location location);

        /// <summary>
        /// Removes the location from the database
        /// </summary>
        /// <param name="location">Location to be removed</param>
        [OperationContract]
        void Remove(Location location);

    }
}
